Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect to mongo container #113

Open
wants to merge 3 commits into
base: backend/python
Choose a base branch
from

Conversation

AChauvin78
Copy link

@AChauvin78 AChauvin78 commented Jun 26, 2023

should close #111

Still opened questions:

Right now we chose to:

  • use pymongo because it's simpler, but soon we'll try to move to pymongoose because it seems to better handle schemes and data validation (even if this still have to be debated)
  • not use an app factory, but keep in mind that we should use one, and maybe move to a more classic flask app project organization (use a config.py maybe?)
  • the db object is in backenddatabase/__init__.py and because backend is the sys.path it can be accessed through import database, however the controllers still deal with collections adding which doesn't seem really clean...

Some tutos that might be useful:

@AChauvin78 AChauvin78 changed the base branch from main to backend/python June 26, 2023 12:36
@ctmbl ctmbl requested a review from atxr June 26, 2023 12:51
@ctmbl ctmbl added Priority: High The Issue must be addressed as soon as possible DB about the website database backend refactoring labels Jun 29, 2023
@ctmbl ctmbl linked an issue Jun 29, 2023 that may be closed by this pull request
atxr
atxr approved these changes Jul 3, 2023
Copy link
Contributor

@atxr atxr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still have a prettier issue though, make sure to run make pretty to format the code!
🥤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend refactoring DB about the website database Priority: High The Issue must be addressed as soon as possible
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Connect backend to MongoDB and fill routes endpoints
3 participants